<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" import="java.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
//ArrayList传递
ArrayList al = new ArrayList();
al.add("张三");
al.add("李四");
al.add("王五");
request.setAttribute("name", al);
//HashMap传递
HashMap hs = new HashMap();
hs.put("USA","美国");
hs.put("China","中国");
hs.put("RUS","俄国");
hs.put("FRA","法国");
request.setAttribute("country", hs);
//开始跳转
RequestDispatcher rd = request.getRequestDispatcher("c.jsp");
rd.forward(request,response);
%>
</body>
</html>